how to handle bash codes